From: Wei Liu Date: Wed, 30 Sep 2015 14:54:11 +0000 (+0100) Subject: libxl: don't shadow global "socket" in psr code X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~2468 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=d776ffe95324a45626a635cf46e9e9b436083a12;p=xen.git libxl: don't shadow global "socket" in psr code SLES11 and OpenSUSE 11.4 complain: [ 1227s] libxl_psr.c: In function 'libxl_psr_cat_get_l3_info': [ 1227s] libxl_psr.c:342: error: declaration of 'socket' shadows a > global declaration Change "socket" to "socketid" to fix the problem. Reported-by: Olaf Hering Signed-off-by: Wei Liu Cc: Chao Peng Tested-by: Olaf Hering Acked-by: Ian Campbell --- diff --git a/tools/libxl/libxl_psr.c b/tools/libxl/libxl_psr.c index 30740a1bc4..000d748f1f 100644 --- a/tools/libxl/libxl_psr.c +++ b/tools/libxl/libxl_psr.c @@ -339,7 +339,7 @@ int libxl_psr_cat_get_l3_info(libxl_ctx *ctx, libxl_psr_cat_info **info, { GC_INIT(ctx); int rc; - int i = 0, socket, nr_sockets; + int i = 0, socketid, nr_sockets; libxl_bitmap socketmap; libxl_psr_cat_info *ptr; @@ -360,10 +360,10 @@ int libxl_psr_cat_get_l3_info(libxl_ctx *ctx, libxl_psr_cat_info **info, ptr = libxl__malloc(NOGC, nr_sockets * sizeof(libxl_psr_cat_info)); - libxl_for_each_set_bit(socket, socketmap) { - ptr[i].id = socket; - if (xc_psr_cat_get_l3_info(ctx->xch, socket, &ptr[i].cos_max, - &ptr[i].cbm_len)) { + libxl_for_each_set_bit(socketid, socketmap) { + ptr[i].id = socketid; + if (xc_psr_cat_get_l3_info(ctx->xch, socketid, &ptr[i].cos_max, + &ptr[i].cbm_len)) { libxl__psr_cat_log_err_msg(gc, errno); rc = ERROR_FAIL; free(ptr);